<?php
declare (strict_types = 1);

namespace app\api\traits;

use app\api\service\ApiResponse;

trait Curd
{
    /**
     * @NodeAnotation(title="列表")
     */    
    public function index()
    {
        list($page, $limit, $where) = $this->buildTableParames();
        $list = $this->model
                ->where($where)
                ->page($page, $limit)
                ->order($this->sort)
                ->select();
        return ApiResponse::success($list);
    }

   
}